package com.tiancheng.onecode.convert;

import com.tiancheng.onecode.entity.Merchant;
import com.tiancheng.onecode.entity.MerchantPayConfig;
import com.tiancheng.onecode.model.request.admin.MerchantAddReq;
import com.tiancheng.onecode.model.request.admin.MerchantAddReqNew;
import com.tiancheng.onecode.model.request.admin.MerchantUpdateNewReq;
import com.tiancheng.onecode.model.request.admin.MerchantUpdateReq;
import com.tiancheng.onecode.model.response.admin.MerchantAddStepOneNewRes;
import com.tiancheng.onecode.model.response.admin.MerchantAddStepOneRes;
import com.tiancheng.onecode.model.response.admin.MerchantQueryRes;
import com.tiancheng.onecode.model.response.admin.PlatformMerchantBaseInfoRes;
import com.tiancheng.onecode.trade.model.request.RegisterMerchantReqVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @Author: kellen
 * @Description: 商户信息转换
 * @Date: create in 2024/11/28 15:46
 */
@Mapper(componentModel = "spring")
public interface MerchantConvert {
    MerchantConvert INSTANCE = Mappers.getMapper(MerchantConvert.class);

    MerchantQueryRes convert2PlatformQueryRes(Merchant merchant);

    List<MerchantQueryRes> convert2MerchantQueryResList(List<Merchant> merchants);

    Merchant convert(MerchantAddReq merchantAddReq);
    Merchant convert(MerchantAddReqNew merchantAddReq);
    Merchant convertMerchantUpdateReq(MerchantUpdateReq params);
    Merchant convertMerchantUpdateReq(MerchantUpdateNewReq params);
    MerchantPayConfig convert2MerchantPayConfig(MerchantAddReq merchantAddReq);
    MerchantPayConfig convert2MerchantPayConfig(MerchantAddReqNew merchantAddReq);
    MerchantPayConfig convertFromMerchantUpdateReq(MerchantUpdateReq merchantUpdateReq);
    MerchantPayConfig convertFromMerchantUpdateReq(MerchantUpdateNewReq merchantUpdateReq);
    MerchantAddStepOneRes merchant2MerchantAddStepOneRes(Merchant merchant);
    MerchantAddStepOneNewRes merchant2MerchantAddStepOneNewRes(Merchant merchant);
    PlatformMerchantBaseInfoRes convert2PlatformMerchantDetailRes(MerchantAddStepOneRes merchantAddStepOneRes);

    RegisterMerchantReqVO merchantAddReq2RegisterMerchantReqVO(MerchantAddReq merchantAddReq);

}
